{* $Id$ *}
{include_core file="admin/lib/header.html" title="渠道展示"}
<div class="page-header border-bottom clearfix">
  <h2 class="left">渠道管理<span>{if $info}编辑{else}添加{/if}渠道</span></h2>
  <a href="{AnUrl('channel/admin')}" class="btn btn-default btn-sm right">&lt;&nbsp;返回渠道列表</a>
</div>
<!--start:渠道新增-->
<div class="add-form">
  <form class="js_creatForm" action="{AnUrl('channel/admin/save')}" method="post" enctype="multipart/form-data">
    <input type="hidden" class="js_currId" name="id" value="{$channel_info.id}">
    <table class="table" cellpadding="0" cellspacing="0">

      <tr>
        <th><label for="" class="add-f-label">所属门店分类：</label></th>
        <td>
          <div class="js_parent">
              <select name="info[type]" class="add-f-slt1 js_select js_sel_0" >
                  <option value="0">请选择渠道</option>
                  {html_options options=$store_category selected=$channel_info.type}
              </select>
          </div>
          <div class="tips">
            <span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>
            请选择父级渠道
          </div>
        </td>
      </tr>
      <tr>
        <th><label for="" class="add-f-label">渠道标题：</label></th>
        <td>
          <input name="info[title]"  style="width:490px;" value="{$channel_info.title}" type="text" class="add-f-ipt1 js_title">
          <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>渠道标题会显示在相应内容的标题位置，最多输入 <span style="color:red;">20</span> 字，还可输入 <span class="js_titleNum" style="color:red;">20</span> 字</div>
        </td>
      </tr>
      <tr>
        <th><label for="info[title]" class="add-f-label">渠道描述：</label></th>
        <td>
          <textarea  name="info[channel_desc]" style="width:490px;height:120px;" class="add-f-ipt1">{$channel_info.channel_desc}</textarea>
          <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>渠道标题会显示在相应内容的标题位置，最多输入 <span style="color:red;">20</span> 字，还可输入 <span class="js_titleNum" style="color:red;">20</span> 字</div>
        </td>
      </tr>
      <tr><th>&nbsp;</th><td class="noborder"><button type="submit" class="btn btn-success js_submit">&nbsp;&nbsp;&nbsp;确认&nbsp;&nbsp;&nbsp;</button></td></tr>
    </table>
  </form>
</div>
<!--end:渠道新增-->
<script>


$(function(){

  // 提交验证
  $('.js_submit').click(function(e){
    e.preventDefault();
    var title      = $.trim($('.js_title').val());
    if (!title) {
      showMsg('标题不能为空');
      return;
    }

    $('.js_creatForm').submit();
  });
});
</script>
{include_core file="admin/lib/footer.html"}